/**
 * The methods and types exported from this file are considered as
 * the public API of @rsbuild/core.
 */

import type * as Rspack from '@rspack/core';
import { rspack } from './rspack';

export { runCLI } from './cli';
export { createRsbuild } from './createRsbuild';
export {
  type ConfigParams,
  defineConfig,
  type LoadConfigOptions,
  type LoadConfigResult,
  loadConfig,
} from './loadConfig';
// Core methods
export { type LoadEnvOptions, type LoadEnvResult, loadEnv } from './loadEnv';

// Rsbuild version
export const version: string = RSBUILD_VERSION;

// Rspack instance
export { rspack };
export type { Rspack };

export type { ChainIdentifier } from './configChain';
// Constants
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME } from './constants';
export { defaultAllowedOrigins } from './defaultConfig';
export { ensureAssetPrefix } from './helpers/url';
// Helpers
export { type Logger, logger } from './logger';
export { mergeRsbuildConfig } from './mergeConfig';
export type { RsbuildDevServer } from './server/devServer';
export type { StartServerResult } from './server/helper';
// Types
export type {
  AliasStrategy,
  AppIcon,
  AppIconItem,
  Build,
  BuildOptions,
  BuildResult,
  BundlerPluginInstance,
  Charset,
  CleanDistPath,
  CleanDistPathObject,
  ClientConfig,
  CliShortcut,
  CompressOptions,
  ConfigChain,
  ConfigChainWithContext,
  Connect,
  ConsoleType,
  CreateCompiler,
  CreateRsbuildOptions,
  CrossOrigin,
  CSSLoaderOptions,
  CSSModules,
  CSSModulesLocalsConvention,
  DataUriLimit,
  Decorators,
  DevConfig,
  DistPathConfig,
  EnvironmentConfig,
  EnvironmentContext,
  FilenameConfig,
  HistoryApiFallbackContext,
  HistoryApiFallbackOptions,
  HtmlBasicTag,
  HtmlConfig,
  HtmlFallback,
  HtmlRspackPlugin,
  HtmlTag,
  HtmlTagContext,
  HtmlTagDescriptor,
  HtmlTagHandler,
  InitConfigsOptions,
  InlineChunkConfig,
  InlineChunkTest,
  InlineChunkTestFunction,
  InspectConfigOptions,
  InspectConfigResult,
  InternalContext,
  LegalComments,
  LogLevel,
  ManifestConfig,
  ManifestData,
  ManifestObjectConfig,
  MergedEnvironmentConfig,
  MetaAttrs,
  MetaOptions,
  Minify,
  ModifyBundlerChainFn,
  ModifyBundlerChainUtils,
  ModifyChainUtils,
  ModifyEnvironmentConfigFn,
  ModifyEnvironmentConfigUtils,
  ModifyHTMLContext,
  ModifyHTMLFn,
  ModifyHTMLTagsContext,
  ModifyHTMLTagsFn,
  ModifyRsbuildConfigFn,
  ModifyRsbuildConfigUtils,
  ModifyRspackConfigFn,
  ModifyRspackConfigUtils,
  ModifyWebpackChainFn,
  ModifyWebpackChainUtils,
  ModifyWebpackConfigFn,
  ModifyWebpackConfigUtils,
  ModuleFederationConfig,
  NormalizedConfig,
  NormalizedDevConfig,
  NormalizedEnvironmentConfig,
  NormalizedHtmlConfig,
  NormalizedModuleFederationConfig,
  NormalizedOutputConfig,
  NormalizedPerformanceConfig,
  NormalizedSecurityConfig,
  NormalizedServerConfig,
  NormalizedSourceConfig,
  NormalizedToolsConfig,
  OnAfterBuildFn,
  OnAfterCreateCompilerFn,
  OnAfterDevCompileFn,
  OnAfterEnvironmentCompileFn,
  OnAfterStartDevServerFn,
  OnAfterStartProdServerFn,
  OnBeforeBuildFn,
  OnBeforeCreateCompilerFn,
  OnBeforeDevCompileFn,
  OnBeforeEnvironmentCompileFn,
  OnBeforeStartDevServerFn,
  OnBeforeStartProdServerFn,
  OnCloseBuildFn,
  OnCloseDevServerFn,
  OnDevCompileDoneFn,
  OnExitFn,
  OutputConfig,
  OutputStructure,
  PerformanceConfig,
  PluginManager,
  Polyfill,
  PostCSSLoaderOptions,
  PostCSSOptions,
  PostCSSPlugin,
  PreconnectOption,
  PreviewOptions,
  PrintUrls,
  ProcessAssetsDescriptor,
  ProcessAssetsHandler,
  ProcessAssetsHook,
  ProgressBarConfig,
  ProxyBypass,
  ProxyConfig,
  ProxyFilter,
  ProxyOptions,
  PublicDir,
  PublicDirOptions,
  RequestHandler,
  ResolvedCreateRsbuildOptions,
  ResolveHandler,
  ResolveHook,
  ResourceHintsIncludeType,
  RsbuildConfig,
  RsbuildContext,
  RsbuildEntry,
  RsbuildEntryDescription,
  RsbuildInstance,
  RsbuildMode,
  RsbuildPlugin,
  RsbuildPluginAPI,
  RsbuildPlugins,
  RsbuildProvider,
  RsbuildProviderHelpers,
  RsbuildTarget,
  RspackChain,
  RspackRule,
  ScriptInject,
  ScriptLoading,
  SecurityConfig,
  ServerConfig,
  SetupMiddlewaresContext,
  SetupMiddlewaresFn,
  SourceConfig,
  SourceMap,
  SplitChunks,
  SriAlgorithm,
  SriOptions,
  StartDevServerOptions,
  StyleLoaderOptions,
  ToolsConfig,
  TransformContext,
  TransformDescriptor,
  TransformHandler,
  TransformHook,
  TransformImport,
  WatchFiles,
} from './types';
